# !!! # Crawl responsibly by identifying yourself (and your website/e-mail) on the user-agent
USER_AGENT = 'AresProtocolLab'

# settings for spiders
BOT_NAME = 'TweetScraper'
LOG_LEVEL = 'INFO'

SPIDER_MODULES = ['TweetScraper.spiders']
NEWSPIDER_MODULE = 'TweetScraper.spiders'
ITEM_PIPELINES = {
    'TweetScraper.pipelines.SaveToFilePipeline':100,
}

# settings for where to save data on disk
SAVE_TWEET_PATH = './Data/tweet/'
SAVE_USER_PATH = './Data/user/'

DOWNLOAD_DELAY = 1.0

# settings for selenium

from shutil import which
SELENIUM_DRIVER_NAME = 'firefox'
SELENIUM_BROWSER_EXECUTABLE_PATH = which('firefox')
SELENIUM_DRIVER_EXECUTABLE_PATH = which('geckodriver')
SELENIUM_DRIVER_ARGUMENTS=['-headless']  # '--headless' if using chrome instead of firefox
DOWNLOADER_MIDDLEWARES = {
    'scrapy_selenium.SeleniumMiddleware': 800
}


# from shutil import which
# SELENIUM_DRIVER_NAME = 'chrome'
# SELENIUM_BROWSER_EXECUTABLE_PATH = which('Google\ Chrome', path='/Applications/Google\ Chrome.app/Contents/MacOS')
# print('chrome = %s'%(SELENIUM_BROWSER_EXECUTABLE_PATH))
# SELENIUM_DRIVER_EXECUTABLE_PATH = which('chromedriver-mac64')
# print('SELENIUM_DRIVER_EXECUTABLE_PATH = %s'%(SELENIUM_DRIVER_EXECUTABLE_PATH))
# # SELENIUM_DRIVER_ARGUMENTS=['-headless']  # '--headless' if using chrome instead of firefox
# DOWNLOADER_MIDDLEWARES = {
#     'scrapy_selenium.SeleniumMiddleware': 800
# }
